Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RT 7.4 & RT 7.11: Updated the script with deviation for ASpath set #3365

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

s-nandu
Copy link
Contributor

@s-nandu s-nandu commented Aug 7, 2024

RT 7.4 & RT 7.11: Updated the script with deviation for ASpath set

Added policy result as ACCEPT for policy "match_community_regex"

@s-nandu s-nandu requested review from a team as code owners August 7, 2024 00:50
@s-nandu s-nandu marked this pull request as draft August 7, 2024 00:51
@OpenConfigBot
Copy link

OpenConfigBot commented Aug 7, 2024

Pull Request Functional Test Report for #3365 / 514e887

Virtual Devices

Device Test Test Documentation Job Raw Log
Arista cEOS status
status
RT-7.4: BGP Policy AS Path Set and Community Set
RT-7.11: BGP Policy - Import/Export Policy Action Using Multiple Criteria
Cisco 8000E status
status
RT-7.4: BGP Policy AS Path Set and Community Set
RT-7.11: BGP Policy - Import/Export Policy Action Using Multiple Criteria
Cisco XRd status
status
RT-7.4: BGP Policy AS Path Set and Community Set
RT-7.11: BGP Policy - Import/Export Policy Action Using Multiple Criteria
Juniper ncPTX status
status
RT-7.4: BGP Policy AS Path Set and Community Set
RT-7.11: BGP Policy - Import/Export Policy Action Using Multiple Criteria
Nokia SR Linux status
status
RT-7.4: BGP Policy AS Path Set and Community Set
RT-7.11: BGP Policy - Import/Export Policy Action Using Multiple Criteria
Openconfig Lemming status
status
RT-7.4: BGP Policy AS Path Set and Community Set
RT-7.11: BGP Policy - Import/Export Policy Action Using Multiple Criteria

Hardware Devices

Device Test Test Documentation Raw Log
Arista 7808 status
status
RT-7.4: BGP Policy AS Path Set and Community Set
RT-7.11: BGP Policy - Import/Export Policy Action Using Multiple Criteria
Cisco 8808 status
status
RT-7.4: BGP Policy AS Path Set and Community Set
RT-7.11: BGP Policy - Import/Export Policy Action Using Multiple Criteria
Juniper PTX10008 status
status
RT-7.4: BGP Policy AS Path Set and Community Set
RT-7.11: BGP Policy - Import/Export Policy Action Using Multiple Criteria
Nokia 7250 IXR-10e status
status
RT-7.4: BGP Policy AS Path Set and Community Set
RT-7.11: BGP Policy - Import/Export Policy Action Using Multiple Criteria

Help

@coveralls
Copy link

coveralls commented Aug 7, 2024

Pull Request Test Coverage Report for Build 10818209816

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 55.252%

Totals Coverage Status
Change from base Build 10808019058: 0.0%
Covered Lines: 1983
Relevant Lines: 3589

💛 - Coveralls

@s-nandu s-nandu marked this pull request as ready for review September 4, 2024 05:00
aspathSet.SetAsPathSetMember(aspathMatch)
stmt1.GetOrCreateConditions().GetOrCreateBgpConditions().GetOrCreateMatchAsPathSet().SetAsPathSet(aspathSetName)
stmt1.GetOrCreateConditions().GetOrCreateBgpConditions().GetOrCreateMatchAsPathSet().SetMatchSetOptions(aspMatchSetOptions)
if !deviations.BgpAspathsetUnsupported(dut) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order to accept the BgpAspathsetUnsupported deviation, a workaround/alternative needs to be proposed to achieve similar functionality. This could be using CLI configuration applied via a gnmi.Set using union_replace.

For example, does juniper support implementing an OC call-policy which refers to a policy defined in native Juniper configuration that can match on as-paths?

@@ -100,7 +103,6 @@ func configureImportBGPPolicy(t *testing.T, dut *ondatra.DUTDevice, ipv4 string,
cs = append(cs, oc.UnionString(communityMatch))
}
communitySet.SetCommunityMember(cs)
communitySet.SetMatchSetOptions(commMatchSetOptions)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks ok, I see it is moved into a separate, already accepted deviation in line 123.

@@ -273,6 +276,10 @@ func TestCommunitySet(t *testing.T) {
bs := cfgplugins.NewBGPSession(t, cfgplugins.PortCount2, nil)
bs.WithEBGP(t, []oc.E_BgpTypes_AFI_SAFI_TYPE{oc.BgpTypes_AFI_SAFI_TYPE_IPV4_UNICAST, oc.BgpTypes_AFI_SAFI_TYPE_IPV6_UNICAST}, []string{"port2"}, true, true)

if deviations.BgpAspathsetUnsupported(bs.DUT) {
testResults[4] = true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see above, we need some alternative configuration/policy to achieve the desired behavior of matching on as paths.

@@ -90,7 +90,7 @@ functions.
* conditions/bgp-conditions/match-community-set/config/
* community-set: "regex-community"
* match-set-options: "ANY"
* actions/config/policy-result = "NEXT_STATEMENT"
* actions/config/policy-result = "ACCEPT_ROUTE"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me.

@@ -415,7 +449,14 @@ func configureImportExportMultifacetMatchActionsBGPPolicy(t *testing.T, dut *ond
t.Fatalf("AppendNewStatement(%s) failed: %v", matchAspathSetMedStatement, err)
}

// TODO create as-path-set on the DUT, match-as-path-set not support.
// Configure my_aspath: [ "65512" ] to match_aspath_set_med statement
if !deviations.BgpAspathsetUnsupported(dut) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There needs to be some alternative to using aspath to achieve similar behavior. Without this, I can't accept this deviation.

@dplore dplore self-assigned this Sep 11, 2024
@dplore
Copy link
Member

dplore commented Sep 12, 2024

Fixes #3415

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Usage of NEXT_STATEMENT policy result in RT-7.11-import_export_multi_test
7 participants